feat: add frame-pointers profile option#16742
feat: add frame-pointers profile option#16742enricobolzonello wants to merge 1 commit intorust-lang:masterfrom
Conversation
|
r? @ehuss rustbot has assigned @ehuss. Use Why was this reviewer chosen?The reviewer was selected based on:
|
5319efa to
803cb57
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
e054730 to
2936185
Compare
|
@rfcbot fcp merge cargo |
|
Team member @epage has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
973aa24 to
615d4d3
Compare
Add `frame-pointers` as a profile setting that maps to `-C force-frame-pointers`. Uses string values (for now `"force-on"`, `"force-off"` and `"default"`) to allow future variants to be added. This allows to turn on frame pointers for a particular profile in `Cargo.toml`, addressing issue rust-lang#15333.
615d4d3 to
0d429de
Compare
|
@rust-rfcbot reviewed |
| - `"force-off"`: Don't force frame pointers (the compiler may still emit them based on target defaults). | ||
| - `"default"`: Use the compiler's target-specific default. |
There was a problem hiding this comment.
This is still a bit confusing. It sounds like depending target just like the default bvehavior. Though I guess it is probably more a rustc issue.
What does this PR try to resolve?
Allow turning on frame pointers for a particular profile in
Cargo.tomlby addframe-pointersas a profile setting that maps to-C force-frame-pointers.Values:
"force-on"->-C force-frame-pointers=yes"force-off"->-C force-frame-pointers=no"default"-> no-opFixes issue #15333.
How to test and review this PR?
Run the tests in
tests/testsuite/profiles.rs:frame_pointers_force_onframe_pointers_force_offframe_pointers_unspecifiedframe_pointers_invalid_value